import os, sys, commands

Import('env')
Import('platform_libs')
#Import('boost_lib_path')

env = env.Clone()

prgs = []

# -----do not deps of any third party-----
chef_buffer_srcs = ['chef_buffer_test.cc']
prgs += env.Program('chef_buffer_test', chef_buffer_srcs, LIBS=platform_libs)

chef_count_dump_srcs = ['chef_count_dump_test.cc']
prgs += env.Program('chef_count_dump_test', chef_count_dump_srcs, LIBS=platform_libs)

chef_crypto_md5_op_srcs = ['chef_crypto_md5_op_test.cc']
prgs += env.Program('chef_crypto_md5_op_test', chef_crypto_md5_op_srcs, LIBS=platform_libs)

chef_crypto_sha1_op_srcs = ['chef_crypto_sha1_op_test.cc']
prgs += env.Program('chef_crypto_sha1_op_test', chef_crypto_sha1_op_srcs, LIBS=platform_libs)

chef_defer_srcs = ['chef_defer_test.cc']
prgs += env.Program('chef_defer_test', chef_defer_srcs, LIBS=platform_libs)

chef_encoding_base64_op_srcs= ['chef_encoding_base64_op_test.cc']
prgs += env.Program('chef_encoding_base64_op_test', chef_encoding_base64_op_srcs, LIBS=platform_libs)

chef_filepath_op_srcs = ['chef_filepath_op_test.cc']
prgs += env.Program('chef_filepath_op_test', chef_filepath_op_srcs, LIBS=platform_libs)

chef_hash_srcs = ['chef_hash_test.cc']
prgs += env.Program('chef_hash_test', chef_hash_srcs, LIBS=platform_libs)

chef_lru_srcs = ['chef_lru_test.cc']
prgs += env.Program('chef_lru_test', chef_lru_srcs, LIBS=platform_libs)

chef_os_exec_op_srcs = ['chef_os_exec_op_test.cc']
prgs += env.Program('chef_os_exec_op_test', chef_os_exec_op_srcs, LIBS=platform_libs)

chef_stringify_stl_srcs = ['chef_stringify_stl_test.cc']
prgs += env.Program('chef_stringify_stl_test', chef_stringify_stl_srcs, LIBS=platform_libs)

chef_strings_op_srcs = ['chef_strings_op_test.cc']
prgs += env.Program('chef_strings_op_test', chef_strings_op_srcs, LIBS=platform_libs)

chef_task_thread_srcs = ['chef_task_thread_test.cc']
prgs += env.Program('chef_task_thread_test', chef_task_thread_srcs, LIBS=platform_libs)

chef_thread_group_srcs = ['chef_thread_group_test.cc']
prgs += env.Program('chef_thread_group_test', chef_thread_group_srcs, LIBS=platform_libs)

chef_thread_pool_srcs = ['chef_thread_pool_test.cc']
prgs += env.Program('chef_thread_pool_test', chef_thread_pool_srcs, LIBS=platform_libs)

chef_wait_event_srcs = ['chef_wait_event_test.cc']
prgs += env.Program('chef_wait_event_test', chef_wait_event_srcs, LIBS=platform_libs)

chef_wait_event_counter_srcs = ['chef_wait_event_counter_test.cc']
prgs += env.Program('chef_wait_event_counter_test', chef_wait_event_counter_srcs, LIBS=platform_libs)

chef_fmt_op_srcs = ['chef_fmt_op_test.cc']
prgs += env.Program('chef_fmt_op_test', chef_fmt_op_srcs, LIBS=platform_libs)

chef_env_var_op_srcs = ['chef_env_var_op_test.cc']
prgs += env.Program('chef_env_var_op_test', chef_env_var_op_srcs, LIBS=platform_libs)

chef_this_machine_op_srcs = ['chef_this_machine_op_test.cc']
prgs += env.Program('chef_this_machine_op_test', chef_this_machine_op_srcs, LIBS=platform_libs)

chef_this_process_op_srcs = ['chef_this_process_op_test.cc']
prgs += env.Program('chef_this_process_op_test', chef_this_process_op_srcs, LIBS=platform_libs)

chef_weight_selector_srcs = ['chef_weight_selector_test.cc']
prgs += env.Program('chef_weight_selector_test', chef_weight_selector_srcs, LIBS=platform_libs)

chef_snippet_srcs = ['chef_snippet_test.cc']
prgs += env.Program('chef_snippet_test', chef_snippet_srcs, LIBS=platform_libs)

chef_consistent_hash_srcs = ['chef_consistent_hash_test.cc']
prgs += env.Program('chef_consistent_hash_test', chef_consistent_hash_srcs, LIBS=platform_libs)

chef_consistent_hash_srcs = ['chef_skiplist_test.cc']
prgs += env.Program('chef_skiplist_test', chef_consistent_hash_srcs, LIBS=platform_libs)

chef_daemon_op_srcs = ['chef_daemon_op_test.cc']
prgs += env.Program('chef_daemon_op_test', chef_daemon_op_srcs, LIBS=platform_libs)

chef_stuff_op_srcs = ['chef_stuff_op_test.cc']
prgs += env.Program('chef_stuff_op_test', chef_stuff_op_srcs, LIBS=platform_libs)

chef_filelock_srcs = ['chef_filelock_test.cc']
prgs += env.Program('chef_filelock_test', chef_filelock_srcs, LIBS=platform_libs)

chef_crypto_sha256_op_srcs = ['chef_crypto_sha256_op_test.cc']
prgs += env.Program('chef_crypto_sha256_op_test', chef_crypto_sha256_op_srcs, LIBS=platform_libs)

chef_crypto_hmac_sha256_srcs = ['chef_crypto_hmac_sha256_test.cc']
prgs += env.Program('chef_crypto_hmac_sha256_test', chef_crypto_hmac_sha256_srcs, LIBS=platform_libs)

chef_be_le_op_srcs = ['chef_be_le_op_test.cc']
prgs += env.Program('chef_be_le_op_test', chef_be_le_op_srcs, LIBS=platform_libs)

chef_debug_mutex_srcs = ['chef_debug_mutex_test.cc']
prgs += env.Program('chef_debug_mutex_test', chef_debug_mutex_srcs, LIBS=platform_libs)

# -----deps third party-----

#chef_http_op_srcs = ['dup.cc', 'chef_http_op_test.cc']
#chef_http_libs = platform_libs
#chef_http_libs += ['curl']
#prgs += env.Program('chef_http_op_test', chef_http_op_srcs, LIBS=platform_libs)

#chef_log_srcs = ['chef_log_test.cc']
#chef_log_libs = platform_libs
#chef_log_libs += [
#  File(boost_lib_path+'libboost_log_setup.a'),
#  File(boost_lib_path+'libboost_log.a'),
#  File(boost_lib_path+'libboost_thread.a'),
#  File(boost_lib_path+'libboost_system.a'),
#  File(boost_lib_path+'libboost_filesystem.a'),
#  File(boost_lib_path+'libboost_date_time.a')
#]
#prgs += env.Program('chef_log_test', chef_log_srcs, LIBS=platform_libs)

Return('prgs')
